<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>documentName</title>
    <link rel="stylesheet" href="./assist/style/style.css" />
  </head>

  <body>
    <div class="a" id="a0"></div>
    <div class="a" id="a1"></div>

    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
    <script>
      console.log('一般获取')
      console.log($('#a0').outerWidth(true)) // 200 + 11*2 + 3*2 + 22*2 = 272
      console.log($('#a0').outerHeight(true)) // 400 + 11*2 + 3*2 + 22*2 = 472

      console.log('border-box')
      console.log($('#a1').outerWidth(true)) // 200 + 22*2 = 244
      console.log($('#a1').outerHeight(true)) // 400 + 22 * 2 = 444
    </script>
  </body>
</html>
